package com.t12;

/**
 * Created by xuyiwei on 2018/7/23.
 */
class SimpleException extends Exception{}
public class InheritingExceptions {
    public void f() throws SimpleException {
        throw new SimpleException();
    }

    public static void main(String[] args) {
        InheritingExceptions in = new InheritingExceptions();
        try {
            in.f();
        } catch (SimpleException e) {
            System.out.println("进入了SimpleException异常");
        }
    }
}
